package com.jy.rhin.model;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.model.body.canjishi.CanJiShi;
import com.jy.rhin.model.body.guominshi.GuoMinShi;
import com.jy.rhin.model.body.jiwangshi.*;
import com.jy.rhin.model.body.shenghuohuanjing.*;
import com.jy.rhin.model.body.shiyanshijiancha.ShiYanShiXX;
import com.jy.rhin.model.body.yichuanbingshi.YiChuanBS;
import com.jy.rhin.model.body.zhiyebaolushi.ZhiYeBLS;
import com.jy.rhin.model.header.Participant;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @Author 姚俊
 * @Date 2023/2/7 15:39
 * @Description 个人基本信息登记
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class GeRenJBXXDJ extends ClinicalDocumentData {

    @XPath(path = "/id/@extension")
    String id;
    //联系人
    @XPath(path = "/participant/associatedEntity")
    Participant participant;

    //实验室 血型条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='30954-2'][@codeSystem='2.16.840.1.113883.6.1']/..")
    ShiYanShiXX shiYanShiXX;

    //费用章节 医疗付款方式
    @XPath(path = "/component/structuredBody/component/section/code[@code='48768-6'][@codeSystem='2.16.840.1.113883.6.1']/../entry/observation/value",
            xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE07_00_007_00))
    CodeObject yiLiaoFKFS;

    //过敏史 过敏条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='48765-2'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry"
            , listItemBackLevel = 0)
    List<GuoMinShi> guoMinShi;

    //职业暴露史 环境危险因素暴露类别条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='10161-8'][@codeSystem='2.16.840.1.113883.6.1']/..")
    ZhiYeBLS zhiYeBLS;

    //既往史 既往疾病史条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='11348-0'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry/observation/code[@code='DE02.10.021.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , listItemBackLevel = 0)
    List<JiWangSJWJB> jiWangSJWJB;

    //既往史 手术史条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='11348-0'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry/observation/code[@code='DE02.10.062.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , listItemBackLevel = 0)
    List<ShouShuShi> shouShuShi;

    //既往史 输血史条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='11348-0'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry/observation/code[@code='DE06.00.106.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , listItemBackLevel = 0)
    List<ShuXueShi> shuXueShi;

    //既往史 外伤史条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='11348-0'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry/observation/code[@code='DE02.10.069.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , listItemBackLevel = 0)
    List<WaiShangShi> waiShangShi;

    //家族史
    @XPath(path = "/component/structuredBody"
            , listItemPath = "/component/section/code[@code='10157-6'][@codeSystem='2.16.840.1.113883.6.1']/../.."
            , listItemBackLevel = 0)
    List<JiaZuShi> jiaZuShi;

    //遗传病史 遗传病史条目
    @XPath(path = "/component/structuredBody"
            , listItemPath = "/component/section/code[@displayName='遗传病史']/../.."
            , listItemBackLevel = 0)
    List<YiChuanBS> yiChuanBS;

    //残疾史 残疾史条目
    @XPath(path = "/component/structuredBody"
            , listItemPath = "/component/section/code[@code='8671-0'][@codeSystem='2.16.840.1.113883.6.1']/../.."
            , listItemBackLevel = 0)
    List<CanJiShi> canJiShi;

    //家庭厨房排风设施类别条目
    @XPath(path = "/component/structuredBody/component/section/code[@displayName='生活环境']/entry/observation/code[@code='DE03.00.099.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , xValid = @XValid(nullable = true))
    JiaTingCFPFSSLB jiaTingCFPFSSLB;

    //家庭燃料类型类别条目
    @XPath(path = "/component/structuredBody/component/section/code[@displayName='生活环境']/entry/observation/code[@code='DE03.00.050.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , xValid = @XValid(nullable = true))
    JiaTingRLLXLB jiaTingRLLXLB;

    //家庭饮水类别条目
    @XPath(path = "/component/structuredBody/component/section/code[@displayName='生活环境']/entry/observation/code[@code='DE03.00.082.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , xValid = @XValid(nullable = true))
    JiaTingYSLB jiaTingYSLB;

    //家庭厕所类别条目
    @XPath(path = "/component/structuredBody/component/section/code[@displayName='生活环境']/entry/observation/code[@code='DE03.00.005.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , xValid = @XValid(nullable = true))
    JiaTingCSLB jiaTingCSLB;

    //家庭禽畜栏类别条目
    @XPath(path = "/component/structuredBody/component/section/code[@displayName='生活环境']/entry/observation/code[@code='DE03.00.049.00'][@codeSystem='2.16.156.10011.2.2.1']/../.."
            , xValid = @XValid(nullable = true))
    JiaTingQCLLB jiaTingQCLLB;

}
